package com.kezesong.leasing.common.exception;

import com.kezesong.leasing.common.enums.ReturnCodeEnum;

public class CommonException extends Exception{

    private String responseCode;
    private String responseMsg;

    public CommonException(String responseCode, String responseMsg){
        this.responseCode = responseCode;
        this.responseMsg = responseMsg;
    }

    public CommonException(ReturnCodeEnum returnCodeEnum){
        this.responseCode = returnCodeEnum.getCode();
        this.responseMsg = returnCodeEnum.getDesc();
    }

    public String getResponseCode() {
        return responseCode;
    }

    public String getResponseMsg() {
        return responseMsg;
    }
}
